#NoTrayIcon
#RequireAdmin
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=..\qp.ico
#AutoIt3Wrapper_Outfile_x64=qp_ar_x64.exe
#AutoIt3Wrapper_UseUpx=n
#AutoIt3Wrapper_UseX64=y
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****

If Not IsAdmin() Then Exit MsgBox(0, "qp ver 0.1", "No admin rights!")
If $CmdLine[0] <> 2 Then Exit MsgBox(0, "qp ver 0.1", "Invalid arguments!")

Switch $CmdLine[2]
	Case 1
		RegWrite("HKCU64\Software\Microsoft\Windows\CurrentVersion\Run", "qp.exe", "REG_SZ", $CmdLine[1])
	Case 0
		RegDelete("HKCU64\Software\Microsoft\Windows\CurrentVersion\Run", "qp.exe")
EndSwitch